<?php
/**
 * Created by PhpStorm.
 * User: liang
 * Email:1050187159@qq.com
 * Date: 8/9/2018
 * Time: 7:52 PM
 */

namespace Admin\Controller;

use Think\Controller;

class BaseController extends Controller
{
     public function _initialize()
     {
         $id = session('id');
         //判断用户是否登录
         if (empty($id)) {
             $this->redirect('/Admin/Public/login');
         }
     }

     public function _empty()
     {
         $this->display('Error/error');
     }
}